package conchmusic.conchmusicclient.dao;

import conchmusic.conchmusicclient.pojo.Artist;
import conchmusic.conchmusicclient.pojo.Song;
import conchmusic.conchmusicclient.pojo.SongList;
import conchmusic.conchmusicclient.pojo.User;
import java.util.List;

/**
 * Created by 76706 on 2017/4/19.
 */

public interface InterfaceDB {

    /**
     * find Artist's localArtistId
     * @param artistName Artist's artistName
     * @return int localArtistId
     */
    public int findArtist(String artistName);

    /**
     * judge artist_song table exist
     * @param localArtistId Artist's localArtistId
     * @param localSongId Song's localSongId
     * @return true if exist
     */
    public boolean findArtist_Song(int localArtistId,int localSongId);
    public int findLocalSongId(String title,String albumName);
    public int findLocalSongId(int songId);
    public User findUser();
    public User findUser(int userId);
    public int findSongList(int songListId);
    public int findSongList(String songListName,int userId);
    public boolean findSong_SongList(int songListId,int localSongId);
    public List<Song> findSongs(int songListId);
    public List<Song> findSongs(int songListId,String title);
    public Song findSong(int localSongId);
    public List<SongList> findSongLists(int userId);


    public boolean addArtist(Artist artist);
    public boolean addSong(Song song);
    public boolean addArtist_Song(int localArtistId,int localSongId);
    public boolean addUser(User user);
    public boolean addSongList(SongList songList);
    public boolean addSong_SongList(int songListId,int localSongId);

    public void deleteSong(int localSongId,int songListId);
    public void deleteSong(int localSongId);
    public void deleteSong();
    public void deleteSongList(int songListId);
    public boolean deleteSongList();
    public boolean deleteSong_SongList(int localSongId,int songListId);
    public boolean deleteSong_SongList();
    public void deleteArtist(int localArtistId);
    public void deleteArtist_Song(int localArtistId,int localSongId);
    public void deleteArtist_Song();
    public void deleteArtist();


    public boolean updateSongList(SongList songList);
    public boolean updateSong(Song song);
    public boolean deleteSongUrl(int localSongId);
    public boolean updateUser(User user);
    public boolean updateArtist(Artist artist);
    public boolean logout(int userId);

}
